home *** CD-ROM | disk | FTP | other *** search
- # ***************************************************************************
- # docstash
- #
- # this Bourne Shell script demonstrates the automation of the DOCZ
- # System with SCCS version control.
- #
- # This script can be called from DOCLIS using the -c option, as in
- # -c=docstash
- #
- # $1=Library name
- # $2=Module name
- # $3=File name
- # $4=Comment
- # ***************************************************************************
-
- # test for required arguments
- if test "$1" -a "$2" -a "$3"
- then
- if test -f $3
- then
- LIBNAME=`echo $1 | tr "[a-z]" "[A-Z]"`
- # see if previous SCCS file
- if test -f $DOCSRC/$LIBNAME/s.$3
- then
- # test for comment argument
- if test "$4"
- then
- echo Updating SCCS file for $3
- # check for reservations
- if test ! -f $DOCSRC/$LIBNAME/p.$3
- then
- get -e -g $DOCSRC/$LIBNAME/s.$3
- fi
- delta "-y$4" $DOCSRC/$LIBNAME/s.$3
- else
- echo "Comment required for update!" >&2
- exit 1
- fi
- else
- echo Creating new SCCS file for $3
- rm $DOCSRC/$LIBNAME/$3
- admin -i$3 "-y`docget $2 $3 des`" $DOCSRC/$LIBNAME/s.$3
- rm $3
- fi
- else
- echo "DOCSTASH: cannot find $3"
- fi
- else
- echo "docstash <library> <module> <file> <comment>"
- fi
-
- # ***************************************************************************
-